const defaultState = {
    PageDisplay :
        {
            display : "none"
        }
}
export default (state = defaultState,action )=>{
    console.log(action,state)
    switch (action.type) {
        case  "handleOnclick":
            if (state.PageDisplay.display === "block"){
                console.log("To hide")
                return {PageDisplay: {display: "none"}}
            }
            if (state.PageDisplay.display === "none"){
                console.log("To display")
                return {PageDisplay: {display: "block"}}
            }
    }
    console.log("ccc")
    return {PageDisplay: {display: "none"}}
}
